
import { CradColor, mark } from "./enums";
import { Deck } from "./types";
function createDock():Deck{
    const deck:Deck = []; // 定义扑克
    const marks = Object.values(mark)
    const colors = Object.values(CradColor)
    for (const m of marks) {
        const element = m;
        for(const c of colors){
            deck.push({
                color:c,
                mark:m
            })
        }
        
    }
    return deck
}
function printDeck(deck:Deck){
    let result="\n";
    deck.forEach((item,index)=>{
       let  str= item.color+item.mark;
        result +=str+"\t"
       if((index+1)%6 ===0){
        result += "\n"
       }
    })
    
    console.log(result)
}
const deck = createDock()
printDeck(deck)